package com.sh.data.engine.application.model.request.integration;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.List;

/**
 * @author：jingchen.hr
 * @descripion:
 * @data:4/21/20223:41 PM
 */
@Data
@Schema
public class PreviewDataForMqRequest {

    @Schema(description = "Kafka Mqtt")
    private String mqType;

    @Schema(description = "主题")
    private String topic;

    @Schema(description = "字段信息")
    private List<FieldInfo> fieldInfoList;

    @Schema(description = "js脚本")
    private String jsonContent;

    //0-jsonpath 1-js解析
    @Schema(description = "解析方式 0-默认 1-自定义")
    private String anaysisType;

    @Schema(description = "来源kafka、mqtt id")
    private Long dsId;


    @Data
    @Schema(name = "PreviewDataForMqRequest-fieldInfo")
    public static class FieldInfo {
        @Schema(description = "字段名")
        private String fieldName;

        @Schema(description = "表达式")
        private String fieldExpress;
    }
}
